import React, { Component } from 'react'
// 如果父组件的属性和状态发生改变，默认情况下，子组件也要重新渲染
class Child extends Component {
  render () {
    console.log('child')
    return (
      <div>child</div>
    )
  }
}
export default class App extends Component {
  state = {
    count: 100
  }
  render() {
    return (
      <div>
        <button onClick = { () => {
          this.setState({
            count: this.state.count
          })
        }}>改变数据</button>
        <Child />
      </div>
    )
  }
}
